import request from '@/utils/request'

export const getShowList = () =>
  request({ url: '/admin/acl/permission', method: 'get' })

// 添加 修改 根权限
export const addOrEditPermission = (data) =>
  request({
    url: data.id
      ? '/admin/acl/permission/update'
      : '/admin/acl/permission/save',
    method: data.id ? 'put' : 'post',
    data
  })

// 删除权限
export const delPermission = (id) =>
  request({ url: `/admin/acl/permission/remove/${id}`, method: 'delete' })
